package com.besttone.model;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

import com.besttone.common.StaticConstantType;
import com.jfinal.plugin.activerecord.Model;
import com.jfinal.plugin.activerecord.Page;

public class BstReceiveCoupon extends Model<BstReceiveCoupon> {
    private static Log _log = LogFactory.getLog(BstReceiveCoupon.class);
    public static BstReceiveCoupon dao = new BstReceiveCoupon();

    public Page<BstReceiveCoupon> getNotSyncData(int pageNumber) {
	String select = "select h.id as id,h.couponCode as coupon_code,h.phone as phone,h.createTime as create_time";
	String sqlExceptSelect = " from bst_receive_coupon h where h.is_sync="
		+ StaticConstantType.IS_NOT_SYNC;
	return dao.use("bstDB").paginate(pageNumber, 10, select,
		sqlExceptSelect);
    }
}
